<?php
class SearchUtility
{
    public static function updatePreference($userId, $interestId, $genderId, $ageFrom, $ageTo, $cityId, $distance)
    {
        SearchPreferenceModel::model()->updateByPk($userId, array('interest_id' => $interestId,
                                                                  'gender_id' => $genderId,
                                                                  'age_from' => $ageFrom,
                                                                  'age_to' => $ageTo,
                                                                  'city_id' => $cityId,
                                                                  'distance' => $distance));
    }
}